package com.itgaoshu.mapper;


import com.itgaoshu.bean.SysUser;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 管理系统用户的mapper接口
 */
public interface SysUserMapper extends Mapper<SysUser> {
    //查询用户是否已经存在
    public int   checkUser(String loginname);
    //删除用户
    @Delete("delete from sys_user where userid=#{userid}")
    public int deleteUserById(Integer userid);
    @Update("update sys_user set loginname=#{loginname},realname=#{realname},identity=#{identity}" +
            ",address=#{address},phone=#{phone},position=#{position},sex=#{sex}" +
            ",available=#{available} where userid=#{userid}")
    public int updateUser(SysUser user);
}